#include "Configuration.h"
#include "PageLibPreProcessor.h"
#include "SplitTool.h"
#include "WebPage.h"

int main() {
    // 读取配置文件
    Configuration *conf = Configuration::getInstance();
    conf->setConfigMap("/home/kyle/Project/WebDisk/conf/myconf.conf");

    // 打开jieba分词工具
    SplitTool *cuttor = new SplitToolCppJieba(conf);

    // 开始预处理
    PageLibPreProcessor ppp(cuttor);
    ppp.cutReddundantPage();
    ppp.buildInvertIndexMap();
    ppp.storeIndexOnDisk();

    // 关闭实例
    conf->deleteInstance();
    delete cuttor;
}